import React, { Component } from "react";
import DragModal from "./dragModal";
import { Button, Tag } from "antd";
import "./index.less";
export default class Index extends Component {
  constructor(props) {
    super(props);
    this.state = {
      showModal: false,
      isDrag: true,
    };
  }
  changeModalStatus = (status) => {
    this.setState({
      showModal: status,
    });
  };
  render() {
    const { showModal, isDrag } = this.state;
    return (
      <div className="category">
        <Button
          type="primary"
          onClick={() => {
            this.changeModalStatus(true);
          }}
        >
          展示弹框
        </Button>
        <DragModal
          visible={showModal}
          title='工单详情'
          // okText='确认'
          // cancelText='取消'
          maskClosable={false}
          mask
          closable
          height={300}
          width={800}
          isDrag={isDrag}
          changeModalStatus={this.changeModalStatus}
        >
          <div className="childrenName">
            <div>
              <span>姓名：</span>
              <Tag>kevin</Tag>
            </div>
            <div>
              <span>姓名：</span>
              <Tag>kevin</Tag>
            </div>
            <div>
              <span>姓名：</span>
              <Tag>kevin</Tag>
            </div>
          </div>
        </DragModal>
      </div>
    );
  }
}
